<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--jstl을 쓰기 위해 사용 --%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--숫자 포맷을 사용하기 위해 사용 --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%><%--함수들을 이용하기 위해 사용 --%>
<%@ taglib prefix="c-rt" uri="http://java.sun.com/jstl/core_rt" %>  <%-- ie버전 확인에 쓰기 위해 씀 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!--<script type="text/javascript" src="script/sms_riskI_script.js"></script>-->
<script type="text/javascript">  
//텝 메뉴 실행
$(function(){
	$( "#tabs" ).tabs(); 
}); 

//onclick시 이동관련
$(function(){
$('ul.tab-menu li a').click(function() {
    //alert($(this).attr('href'));
    location.href=$(this).attr('href');
});
}
); 
</script>  
</head>
<body>
<div class="box1">
  <div id="tabs">

       <ul class="tab-menu">

           <li><a href="#tabs-1" class="t1">자산유형분류기준</a></li>

           <li><a href="#tabs-2" class="t2">자산보안등급평가기준</a></li>

			<li><a href="#tabs-3" class="t3 ">자산기밀등급 분류</a></li>
       </ul>

<div id="tabs-1" style="display:none">
      		<h4 class="white">
      			<span class="align-left">자산유형분류기준</span>
	      		<span class="align-right">상태 :
		      		<c:choose>
		      			<c:when test="${sessionScope.magamSession[1].state =='Y'}">
		      				 마감
		      			</c:when>
		      			<c:otherwise>
		      				 착수
		      			</c:otherwise>
		      		</c:choose>
	      		</span>
      		</h4>
        <div class="box-container1">     		
        <form name="riskIDelForm" action="riskIAction.do" method="post">
        	<input type="hidden" name="mode" value="makind_delete"></input>
        	<input type="hidden" name="pro_id"  id="pro_id" value="${sessionScope.lastProId }"></input>
        	<input type="hidden" name="reloadPageName" value="#tabs-1"></input>
        	<table class="table-long">
      			<tfoot>
      				<tr>
      					<td>
      					<div class="align-right"><!--select class="form-select"><option value="option1">Bulk Options</option>
      					<option value="option2">Delete All</option></select>
      					<a href="#" class="button" onclick="javascript: riskIWritePage('makind_insertPage')"><span>작성</span></a>
      					-->
      						<c:choose>
	                       		<c:when test="${sessionScope.magamSession[1].state !='Y'}">
	                       		<!-- 마감 현황이 유무 판별(Y 시 입력 불가) -->
	                       			<a href="#" class="button"  onclick="javascript: makind_insertPage()"><span>생성</span></a>
      								<a href="#" class="button lastButton"  onclick="javascript: riskIDelete()"><span>삭제</span></a>
	                       		</c:when>
	                       		<c:otherwise>
      								<a href="#" class="button1 addMargin"  onclick="return false;"><span>생성</span></a>
      								<a href="#" class="button1 lastButton addMargin"  onclick="return false;"><span>삭제</span></a>
	                       		</c:otherwise>
	                       	</c:choose>
      					
      					</div></td>
      				</tr>
      				<tr><td class="spaceLine"></td></tr>
      			</tfoot>
      		</table>
      		<table class="table-long">
      			<colgroup>
					<col width="40px"/>
					<col width="115px"/>
					<col width="155px"/>
					<col width="85px"/>
					<col width="85px"/>
					<col/>
					<col width="15px"/>
				</colgroup>
      			<thead>
      				<tr>
      					<td class="col-chk">
      						<input type='checkbox' name='checkAll' onclick="javascript: selectAll()" class="chkCursor"></input>
      					</td>
      					<td colspan="2" style="padding-left: 65px;" >
      						자산유형
      					</td>
      					<td>단축이름</td>
      					<td>자산유형코드</td>
      					<td>분류기준</td>
      					<td></td>
      				</tr>
      			</thead>
      		</table>
      		<div class="scrollDIV"style="height: 460px">
      		<table class="table-long">
      			<colgroup>
					<col width="40px"/>
					<col width="115px"/>
					<col width="155px"/>
					<col width="85px"/>
					<col width="85px"/>
					<col/>
					<col width="15px"/>
				</colgroup>
      			<tbody>
      				<c:choose>
                    	<c:when test="${fn:length(list)!= 0}">
                       	<c:forEach var="list" items="${requestScope.list}" varStatus="status">
	                    			<%--
	                    			<tr onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');" class="odd">
	                    			 --%>
	                    	 <tr <c:if test="${status.index%2==0 }">class="odd"</c:if> onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');">
                    			<td class="col-chk"><input type="checkbox" name="check" id="check00${status.index+1 }" value='${list.ak_id}' class="chkCursor"></input></td>
                    			
                    			
                    				<%--<div class="ellipsis"  style="width:100%;" title="${list.ak_nm1 }">${list.ak_nm1 }</div> --%>
                   						<c:choose>
      										<c:when test="${requestScope.akNm1 == null}">
     												<c:set var="akNm1" scope="request" value="${list.ak_nm1 }"></c:set>
     												
     												<c:forEach var="list2" items="${requestScope.list}" varStatus="status">
                    										<c:if test="${list2.ak_nm1 == requestScope.akNm1 && list.ak_nm1!=list.ak_nm2}">
                    											<c:set var="akNm1Num" scope="request" value="${requestScope.akNm1Num+1 }"></c:set>
                    										</c:if>
                    								</c:forEach>
                    								<td rowspan="${requestScope.akNm1Num }" class="col-rowspanMid">
     												<div class="ellipsis"  style="width:100%;" title="${list.ak_nm1 }">${list.ak_nm1 }</div>
     												</td>
      										</c:when>
      										<%-- 
      										<c:when test="${requestScope.akNm1 != null && list.ak_nm1==requestScope.akNm1}">
     												&nbsp;
      										</c:when>
      										--%>
      										<c:when test="${requestScope.akNm1 != null && list.ak_nm1!=requestScope.akNm1}">
     												<c:set var="akNm1" scope="request" value="${list.ak_nm1 }"></c:set>
     												<c:set var="akNm1Num" scope="request" value="0"></c:set>
     												<c:forEach var="list3" items="${requestScope.list}" varStatus="status">
                    										<c:if test="${list3.ak_nm1 == requestScope.akNm1}">
                    											<c:set var="akNm1Num" scope="request" value="${requestScope.akNm1Num+1 }"></c:set>
                    										</c:if>
                    								</c:forEach>
     												<td rowspan="${requestScope.akNm1Num }" class="col-rowspanMid">
     												<div class="ellipsis"  style="width:100%;" title="${list.ak_nm1 }">${list.ak_nm1 }</div>
     												</td>
      										</c:when>
      									</c:choose>
                    				
                    				
                    				
                    				
                    			
                    			
                    			<%--<td <c:if test="${list.ak_nm1 == list.ak_nm2 }">colspan="2" style="padding-left: 65px"</c:if>> --%>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;">
                    				<a href="riskIAction.do?mode=makind_updatePage&ak_id=${list.ak_id }" class="nor ellipsis" title='${list.ak_nm2 }'>${list.ak_nm2 }</a>
                    				</div>
                    			</td>
                    			
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.cutName }">${list.cutName }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.base_lev1 }">${list.base_lev1 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.ak_standard }">${list.ak_standard }</div>
                    			</td>
	   					 	<td></td>
                    		</tr>
	                    		
                    	</c:forEach>
                    	</c:when>
                    	<c:otherwise>
                    		<tr class="odd">
								<td colspan="4" class="noDataTD">-데이터가 없습니다-</td>
							</tr>
                    	</c:otherwise>
                    	</c:choose>
      			</tbody>
      		</table>  	
      		</div>
      		</form>
      	</div><!-- end of div.box-container1 -->
      	</div>
      	
      	<div id="tabs-2" style="display:none">
      	<!-- 자산보안등급평가기준 -->
      		<h4 class="white">
      			<span class="align-left">자산보안등급평가기준</span>
	      		<span class="align-right">상태 :
		      		<c:choose>
		      			<c:when test="${sessionScope.magamSession[1].state =='Y'}">
		      				 마감
		      			</c:when>
		      			<c:otherwise>
		      				 착수
		      			</c:otherwise>
		      		</c:choose>
	      		</span>
      		</h4>
      	<div class="box-container1">     		
      	
        <form name="riskIDelForm1" action="riskIAction.do" method="post">
        	<input type="hidden" name="mode" value="masecurity_delete"></input>
        	<input type="hidden" name="pro_id" value="${sessionScope.lastProId }"></input>
        	<input type="hidden" name="reloadPageName" value="#tabs-2"></input>
        	<table class="table-long">
      			<tfoot>
      				<tr>
      					<td>
      					<div class="align-right"><!--select class="form-select"><option value="option1">Bulk Options</option>
      					<option value="option2">Delete All</option></select-->
      						<c:choose>
	                       		<c:when test="${sessionScope.magamSession[1].state !='Y'}">
	                       		<!-- 마감 현황이 유무 판별(Y 시 입력 불가) -->
	                       			<a href="#" class="button" onclick="javascript: riskIWritePage('masecurity_insertPage')"><span>추가</span></a>
      								<a href="#" class="button lastButton"  onclick="javascript: riskIDelete1()"><span>삭제</span></a>
	                       		</c:when>
	                       		<c:otherwise>
      								<a href="#" class="button1 addMargin"   onclick="return false;"><span>추가</span></a>
      								<a href="#" class="button1 lastButton addMargin"  onclick="return false;"><span>삭제</span></a>
	                       		</c:otherwise>
	                       	</c:choose>
      					
      					</div></td>
      				</tr>
      				<tr><td class="spaceLine"></td></tr>
      			</tfoot>
      		</table>
      		<table class="table-long">
      			<colgroup>
						<col width="40px"/>
						<col width="80px"/>
						<col width="120px"/>
						<col width="120px"/>
						<col/>
						<col width="15px"/>
			</colgroup>
      			<thead>
      				<tr>
      					<td class="col-chk" rowspan="2"><input type='checkbox' name='checkAll1' onclick="javascript: selectAll1()" class="chkCursor"></input></td>
      					<td class="col-rowspanMid lowPadding" rowspan="2">보안등급</td>
      					<td class="lowPadding" colspan="2" style="padding-left: 60px">지수범위</td>
      					<td  class="lowPadding"  rowspan="2">내용</td>
      					<td  class="lowPadding"  rowspan="2"></td>
      				</tr>
      				<tr>
      					<td class="lowPadding" >시작지수</td>
      					<td class="lowPadding" >종료지수</td>
      				</tr>
      			</thead>
      		</table>
      		<div class="scrollDIV" style="height: 450px">
      		<table class="table-long">
      			<colgroup>
						<col width="40px"/>
						<col width="80px"/>
						<col width="120px"/>
						<col width="120px"/>
						<col/>
						<col width="15px"/>
			</colgroup>
      			<tbody>
      				<c:choose>
                    	<c:when test="${fn:length(scriList)!= 0}">
                       	<c:forEach var="list" items="${requestScope.scriList}" varStatus="status">
	                    			<%--
	                    			<tr onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');" class="odd">
	                    			 --%>
	                    			  <tr <c:if test="${status.index%2==0 }">class="odd"</c:if> onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');">
		                    			<td class="col-chk"><input type="checkbox" name="check1" id="check10${status.index+1 }"  value='${list.ascu_id}' class="chkCursor"></input></td>
		                    			<td>
		                    				<div class="ellipsis"  style="width:100%;"><a href="riskIAction.do?mode=masecurity_updatePage&ascu_id=${list.ascu_id }" class="nor ellipsis" title='${list.ascu_level }'>${list.ascu_level }</a></div>
		                    			</td>
		                    			<td style="padding-left: 35px">
		                    				${list.ascu_scnt } 
		                    			</td>
		                    			<td style="padding-left: 35px">
		                    				${list.ascu_lcnt }
		                    			</td>
		                    			<td>
		                    				<div class="ellipsis" style="width:100%;" title="${list.ascu_content }">${list.ascu_content }</div>
		                    			</td>
			   					 	<td></td>
		                    		</tr>
                    	</c:forEach>
                    	</c:when>
                    	<c:otherwise>
                    		<tr class="odd">
								<td colspan="5" class="noDataTD">-데이터가 없습니다-</td>
							</tr>
                    	</c:otherwise>
                    	</c:choose>
      			</tbody>
      		</table>  	
      		</div>
      		</form>
      		</div>
      		</div>
      		
      		<div id="tabs-3" style="display:none">
      		<h4 class="white">
      			<span class="align-left">자산기밀등급 분류</span>
	      		<span class="align-right">상태 :
		      		<c:choose>
		      			<c:when test="${sessionScope.magamSession[1].state =='Y'}">
		      				 마감
		      			</c:when>
		      			<c:otherwise>
		      				 착수
		      			</c:otherwise>
		      		</c:choose>
	      		</span>
      		</h4>
      		<%--자산기밀등급 분류 --%>
      		<form name="riskIDelForm2" action="riskIAction.do" method="post">
        	<input type="hidden" name="mode" value="masecret_delete"></input>
        	<input type="hidden" name="pro_id" value="${sessionScope.lastProId }"></input>
        	<input type="hidden" name="reloadPageName" value="#tabs-3"></input>
        	<table class="table-long">
      			<tfoot>
      				<tr>
      					<td>
      					<div class="align-right"><!--select class="form-select"><option value="option1">Bulk Options</option>
      					<option value="option2">Delete All</option></select-->
      					
      						<c:choose>
	                       		<c:when test="${sessionScope.magamSession[1].state !='Y'}">
	                       		<!-- 마감 현황이 유무 판별(Y 시 입력 불가) -->
	                       			<a href="#" class="button"  onclick="javascript: riskIWritePage('masecret_insertPage')"><span>추가</span></a>
      								<a href="#" class="button lastButton" onclick="javascript: riskIDelete2()"><span>삭제</span></a>
	                       		</c:when>
	                       		<c:otherwise>
      								<a href="#" class="button1 addMargin"   onclick="return false;"><span>추가</span></a>
      								<a href="#" class="button1 lastButton addMargin" onclick="return false;"><span>삭제</span></a>
	                       		</c:otherwise>
	                       	</c:choose>
      					</div></td>
      				</tr>
      				<tr><td class="spaceLine"></td></tr>
      			</tfoot>
      		</table>
      		<table class="table-long">
      			<colgroup>
					<col width="40px"/>
					<col width="200px"/>
					<col/>
					<col width="15px"/>
				</colgroup>
      			<thead>
      				<tr>
      					<td class="col-chk"><input type='checkbox' name='checkAll2' onclick="javascript: selectAll2()" class="chkCursor"></input></td>
      					<td>기밀등급</td>
      					<td>등급부여기준</td>
      					<td></td>
      				</tr>
      			</thead>
      		</table>
      		<div class="scrollDIV">
      		<table class="table-long">
      			<colgroup>
					<col width="40px"/>
					<col width="200px"/>
					<col/>
					<col width="15px"/>
				</colgroup>
      			<tbody>
      				<c:choose>
                    	<c:when test="${fn:length(secreList)!= 0}">
                       	<c:forEach var="list" items="${requestScope.secreList}" varStatus="status">
	                    			<%--
	                    			<tr onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');" class="odd">
	                    			 --%>
                   			 <tr <c:if test="${status.index%2==0 }">class="odd"</c:if> onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');">
                    			<td class="col-chk"><input type="checkbox" name="check2" id="check20${status.index+1 }"  value='${list.asc_id}' class="chkCursor"></input></td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;"><a href="riskIAction.do?mode=masecret_updatePage&asc_id=${list.asc_id }" class="nor ellipsis" title='${list.asc_level }'>${list.asc_level }</a></div>
                    			</td>
                    			<td>
                    				<div class="ellipsis" style="width:100%;" title="${list.asc_standard }">${list.asc_standard }</div>
                    			</td>
	   					 	<td></td>
                    		</tr>
                    		
                    	</c:forEach>
                    	</c:when>
                    	<c:otherwise>
                    		<tr class="odd">
								<td colspan="3" class="noDataTD">-데이터가 없습니다-</td>
							</tr>
                    	</c:otherwise>
                    	</c:choose>
      			</tbody>
      		</table>  	
      		</div>
      		</form>
      	</div><!-- end of div.box-container1 -->
      	</div>
      	</div> <!-- end of div.box -->
</body>
</html>